import React, { Component } from 'react'
// 类似于vue的插槽
const Title = (props) => {
  return (
    <h1>{ props.children }</h1>
  )
}
class Content extends React.Component {
  render () {
    console.log(this.props.children)
    return (
      <div>
        { this.props.children[0] }
        <div>11111</div>
        { this.props.children[1] }
      </div>
    )
  }
}
class App extends Component {
  render () {
    return (
      <>
        <Title>标题</Title>
        <Content>
          <div key="div2">内容2</div>
          <div key="div1">内容1</div>
        </Content>
      </>
    )
  }
}

export default App